<!doctype html>
<html ng-app>
  <head>
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.2/angular.min.js"></script>
    <script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
    <script src="js/commons.js"></script>
    <script src="js/authorCtrl.js"></script>
  </head>
  <body>
    <h2>Author</h2>
    <div ng-controller="authorCtrl">
      
      <div id="add-container" style="display:none">
      	<div>
		First name: <input type="text" id="firstNameText"><br>
		Last name: <input type="text" id="lastNameText">
		</div>
      	<input type="button" value="OK" ng-click="save()">
      	<input type="button" value="Cancel" ng-click="hideAddContainer()">
      </div>
      
      <div id="new-container">
      	<input type="button" value="New" ng-click="showAddContainer()">
      </div>
      
      <ul>
        <li ng-repeat="author in entities">
          <span>{{author.firstName}}</span>
          <span>-</span>
          <span>{{author.lastName}}</span>
        </li>
      </ul>
      
    </div>
  </body>
</html>